package leecode

import (
	"strconv"
	"strings"
)

func digitOneInNumber(num int) (result int) {
	var str string
	for i := 0; i <= num; i++ {
		str = str + strconv.Itoa(i)
	}
	result = strings.Count(str, "1")
	return
}
